package org.wdh.extend.visitor;

class Branch extends Tree {
	private int value;

	private Tree left;

	private Tree right;

	public Branch(int _value, Tree _left, Tree _right) {
		this.value = _value;
		this.left = _left;
		this.right = _right;
	}

	public Tree getLeft() {
		return this.left;
	}

	public Tree getRight() {
		return this.right;
	}

	public int getValue() {
		return this.value;
	}

	public Object accept(TreeVisitor that) {
		return that.forBranch(this);
	}
}
